Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Kernel debugger</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Kernel_debugger"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Kernel_debugger rootpage-Kernel_debugger skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Kernel debugger</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><p>
A <b>kernel debugger</b> is a <a href="Debugger" title="Debugger">debugger</a> present in some <a href="Kernel_(operating_system)" title="Kernel (operating system)">operating system kernels</a> to ease debugging and kernel development by the kernel developers. A kernel debugger might be a stub implementing low-level operations, with a full-blown debugger such as <a href="GNU_Debugger" title="GNU Debugger">GNU Debugger</a> (gdb), running on another machine, sending commands to the stub over a <a href="Serial_line" class="mw-redirect" title="Serial line">serial line</a> or a network connection, or it might provide a command line that can be used directly on the machine being debugged.
</p><p>Operating systems and operating system kernels that contain a kernel debugger:
</p>
<ul><li>The <a href="Windows_NT" title="Windows NT">Windows NT</a> family includes a kernel debugger named KD,<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> which can act as a local debugger with limited capabilities (reading and writing kernel memory, and setting breakpoints)<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> and can attach to a remote machine over a serial line, <a href="IEEE_1394" title="IEEE 1394">IEEE 1394</a> connection, <a href="Universal_Serial_Bus" class="mw-redirect" title="Universal Serial Bus">USB 2.0</a> or <a href="USB_3.0" title="USB 3.0">USB 3.0</a> connection.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> The <a href="WinDbg" title="WinDbg">WinDbg</a> <a href="GUI" class="mw-redirect" title="GUI">GUI</a> debugger can also be used to debug kernels on local and remote machines.</li>
<li><a href="BeOS" title="BeOS">BeOS</a> and <a href="Haiku_(operating_system)" title="Haiku (operating system)">Haiku</a> include a kernel debugger usable with either an on-screen console or over a serial line. It features various commands to inspect memory, threads, and other kernel structures. In Haiku, the debugger is called "Kernel Debugging Land" (KDL).<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></li>
<li><a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a></li>
<li><a href="Linux_kernel" title="Linux kernel">Linux kernel</a>; No kernel debugger was included in the mainline Linux tree prior to version 2.6.26-rc1 because <a href="Linus_Torvalds" title="Linus Torvalds">Linus Torvalds</a> didn't want a kernel debugger in the kernel.<sup id="cite_ref-linus_5-0" class="reference"><a href="#cite_note-linus-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
<ul><li>KDB (local)<sup id="cite_ref-kdb_7-0" class="reference"><a href="#cite_note-kdb-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup></li>
<li><a href="KGDB" title="KGDB">KGDB</a> (remote)</li>
<li>MDB (local/remote)<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup></li></ul></li>
<li><a href="NetBSD" title="NetBSD">NetBSD</a> has DDB for local and KGDB for remote.</li>
<li><a href="MacOS" title="MacOS">macOS</a> has ddb for local and kdp for remote.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup></li>
<li><a href="OpenBSD" title="OpenBSD">OpenBSD</a> includes ddb which has a syntax is similar to <a href="GNU_Debugger" title="GNU Debugger">GNU Debugger</a>.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;">
<ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debuggers-in-the-debugging-tools-for-windows-package">"Debugging Environments"</a>. <i>Debugging Tools for Windows (WinDbg, KD, CDB, NTSD)</i><span class="reference-accessdate">. Retrieved <span class="nowrap">16 February</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/performing-local-kernel-debugging">"Local Kernel-Mode Debugging"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">16 February</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/performing-kernel-mode-debugging-using-kd">"Live Kernel-Mode Debugging Using KD"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">16 January</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.haiku-os.org/documents/dev/welcome_to_kernel_debugging_land/">"Welcome to Kernel Debugging Land"</a>.</cite></span>
</li>
<li id="cite_note-linus-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-linus_5-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://lwn.net/2000/0914/a/lt-debugger.php3">"LWN.net"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">29 May</span> 2008</span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFTorvalds2008" class="citation web cs1">Torvalds, Linus (3 May 2008). <a rel="nofollow" class="external text" href="https://lwn.net/Articles/280912/">"Linux 2.6.26-rc1"</a>. LWN<span class="reference-accessdate">. Retrieved <span class="nowrap">9 March</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-kdb-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-kdb_7-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFNellitheertha" class="citation web cs1">Nellitheertha, Hariprasad. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20080621041048/http://www.ibm.com/developerworks/linux/library/l-kdbug/index.html">"Inside the Linux kernel debugger"</a>. <i><a href="IBM" title="IBM">IBM</a></i>. Archived from <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/linux/library/l-kdbug/index.html">the original</a> on 21 June 2008<span class="reference-accessdate">. Retrieved <span class="nowrap">29 May</span> 2008</span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://lwn.net/Articles/297281/">"LWN Weekly Kernel News"</a>. 7 September 2008.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20160322085319/http://jeffmerkey.github.io/linux/">"MDB Github Website"</a>. 1 January 2016. Archived from <a rel="nofollow" class="external text" href="https://jeffmerkey.github.io/linux">the original</a> on 22 March 2016.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://lwn.net/Articles/394146/">"LWN Weekly Kernel News"</a>. 28 June 2010.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite id="CITEREFSingh2003" class="citation web cs1">Singh, Amit (December 2003). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200602233536/http://osxbook.com/book/bonus/ancient/whatismacosx/arch_xnu.html">"XNU: The Kernel"</a>. <i>What is Mac OS X?</i>. Archived from <a rel="nofollow" class="external text" href="http://osxbook.com/book/bonus/ancient/whatismacosx/arch_xnu.html">the original</a> on 2 June 2020<span class="reference-accessdate">. Retrieved <span class="nowrap">25 May</span> 2012</span>. <q>the built-in low-level kernel debugger, ddb, is part of XNU's Mach component, and so is kdp, a remote kernel debugging protocol implementation</q></cite></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://man.openbsd.org/ddb">"ddb(4)"</a>. <i>OpenBSD manual page server</i>. 6 December 2019<span class="reference-accessdate">. Retrieved <span class="nowrap">13 December</span> 2019</span>. <q>The ddb debugger provides a means for debugging the kernel, and analysing the kernel after a system crash ("panic"), with a gdb(1)-like syntax.</q></cite></span>
</li>
</ol></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-02-06" href="https://en.wikipedia.org/wiki/?title=Kernel_debugger&amp;oldid=1274293606">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>